# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-intervaltree
_pkgname=intervaltree
pkgver=3.1.0
pkgrel=1
pkgdesc='Editable interval tree data structure for Python 2 and 3'
url='https://pypi.org/project/intervaltree/'
arch=('any')
license=('Apache')
depends=('python2-sortedcontainers')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('adb49726912ad6e9cf6c0985b4fb94df91b4ef54aa2eb327186d7f15bc992745d81654d49f1dd2ce95f7173683ba2a072787ef1e8b389cd9b7e23b9ae743906a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

